export default function randomId() {
  if (
    window.crypto &&
    typeof window.crypto === "object" &&
    typeof window.crypto.randomUUID === "function"
  ) {
    return window.crypto.randomUUID();
  }
  return (Math.random() * Math.PI).toString(16).replace(".", "");
}
